<template>
  <div class="locale">
    <head :back="false">
         <div  class="backbg" slot="left" @click="backTo">
                <image src="root:img/wallet/fanhui@2x.png" style="width: 18px;height: 30px;margin-left: 22px"></image>
         </div>
    </head>
    <div class="main">
      <text class="lang">{{$t('my.lang')}}</text>
      <wxc-radio :list="list" :config="config" @wxcRadioListChecked="wxcRadioListChecked"></wxc-radio>
    </div>
  </div>
</template>
<script>
import { WxcRadio } from 'weex-ui'
export default {
  name: '',
  data() {
    return {
      list:[
        { title: 'English', value: 'en' },
        { title: '简体中文', value: 'zh' },
        { title: '한국어', value: 'ko' },
        { title: '日本', value: 'jp' },
      ],
      config:{
         checkedColor: 'rgba(60,71,98,1)'
      }
    }
  },
  components: {WxcRadio},
  computed: {},
  watch: {},
  created() {
    this.list.forEach(item => {
      if(item.value === this.locale){
        item.checked = true
      }
    })
  },
  mounted() {},
  methods: {
    wxcRadioListChecked(e){
      this.locale = e.value
    },
    backTo(){
       var nav = weex.requireModule('navigator')
       var param=this.navigator.param();
       nav.pushFull({url:param.page,animated:true})
    }
  }
}
</script>
<style scoped>
.main{
  width: 690px;
  margin-left: 30px;
}
.lang{
  font-size: 48px;
  color: rgba(70,120,245,1);
  margin-top: 24px;
  margin-bottom: 70px;
}
</style>